package models

import "github.com/zw2582/ginlib"

type ProductImage struct {
	Id        int64 `xorm:"pk autoincr"`
	ProductId int64
	Name      string
	Image     string
	Code      string
}

func init()  {
	ginlib.XormAddWaitSync(new(ProductImage))
}

func ProductImageFindByProductId(productId int64) (data []ProductImage, err error) {
	err = DB.Where("product_id = ?", productId).Find(&data)
	return
}